home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Precision Software Appli…tions Silver Collection 4
/
Precision Software Applications Silver Collection Volume 4 (1993).iso
/
stats
/
chadyn.exe
/
YINTRPT.DOC
< prev
next >
Wrap
Text File
|
1988-12-15
|
22KB
|
478 lines
YINTRPT.DOC
This file is read by the program as follows. The computer scans each
line looking for lines beginning with a '*'; when it finds one, it compares
the rest of the line with a string it is looking for; if it matches, it prints
out the following lines until it hits another line beginning with a star. The
lines you are now reading are before stars and so cannot be printed out. A
line consisting of a * followed by a return is a terminator and can be
followed on the next lines with comments that will not be printed out.
If you should wish to add an interrupt to interrupt() in YINTRPT.C,
notice that extended ascii characters (including the arrow keys and function
keys and Alt keys) have been given negative values to distinguish them
from ascii keys.
The source code in YCASES.C and YINTRPT.C accesses this text using
the command:
getText("yintrpt.doc","keys\n");
which gets the material following *keys Another similar approach
is used in YFETCH.C.
*A
Actions menu (*A):
p pause
Esc un-pause
: command
*X cross menu
*Y Output menu
*B
Box menu (*B):
b draw box
t draw box with tic marks
T fine Tic marks
*T selecT box
*H
Help level menu (*H):
0 no text
1 minimal text
2 substantial text (ideal)
3 lots of text (default)
q map and parameters and speed
? quick list of interrupts
*S
Screen menu (*S):
c clear
r refresh
*B Box menu
*Z Color menu
*T
selecT box menu (*T):
x,y set lower right hand of box at y1
X,Y set upper left hand of box at y1
*W Window menu
*W
Window menu (*W):
s scale new window
F1 go to upper left window
F2 go to upper right window
F3 go to lower left window
F4 go to upper right window
F10 go to full screen window
c clear current window
C clear entire screen
*
*X
Cross menu (*X):
arrow keys move small cross
i initialize
k big cross along trajectory
K permanent cross at y
O draw circle & images at y1
I increase iterate number
*Y
output menu:
4 print one dot on printer
5 print all dots on printer
P Print screen
*Z
Color menu (*Z):
F5 decrease color + initialize
F6 increase color + initialize
F7 decrease color number
F8 increase color number
F9 set color number
Q set shade (VGA only)
*Q gives shade settings
*
*keys
KEYBOARD INTERRUPTS: (HIT '*'plus key FOR MORE INFORMATION WHILE PLOTTING)
space bar: exit to MainMenu
':' for MainMenu command +/-: [change rho]
0,1,2,3:screen output 4:print-y-on-printer 5:print-trajectory
ARROW KEYS: turn on + move small cross, the position of y1[]
B)ig box: resets box coordinates to those of whole window b)ox (see x..Y)
c,C: clear screen
e)rror[DifEq] E: = e repeatedly
F1,F2,F3,F4: change Screen window F10: whole screen
i)nitialize y[] at small cross
I: increment # images by 1; see *O and *I k: cross at each y
K: permanent cross at y[] L: ya-yb-yc-yd box
m)ove-yx[]-to-yz[]-where x and z = a...e,or 0,1,...,9 i)nitialize-y[]=y1[]
O: draw circle, centered at small cross
p)lot dot & pause Esc: un-pause
P)rint-pic q: parameters,etc
r)efresh screen s)cale changed
t)ic marks T)icmarks u)nscale
w: show coordinates of small cross v: invert process
x,X,y,Y: set box coordinates at small cross:(x,y)=lower left;(X,Y)=up.right
**
KEYBOARD INTERRUPTS:
(HIT '*'plus key FOR MORE INFORMATION WHILE PLOTTING)
space bar: exit to MainMenu
':' to be able to enter a menu command without leaving plot
+/-: [change rho]
Esc: un-pause (resume plotting)
F1,F2,F3,F4: change Screen window (window must be open -- see 's'
F10: change window to be the whole screen
F5,...,F9 select color of future points on screen
0,1,2,3: amount of text going to screen or printer while plotting
4:print-y-on-printer (prints just one point)
5:print-trajectory (prints all points until a lower number is hit)
ARROW KEYS: turn on + move small cross, the position of y1[]
B)ig box: resets box coordinates to those of whole window
b)ox (see x..Y) draw box, whole screen unless x,X,y, or Y is set)
c,C: clear screen c clears only the current window
e)rror[DifEq] gets local error for one differential equation step
E: = e repeatedly, tallies worst local error
i)nitialize y[] at small cross; also resets # images to 0; see I
I: increment # images by 1; see O and L and i
k: temporary cross drawn at each y; hit again to turn off
K: permanent cross at y[]
L: draws ya-yb-yc-yd box (or part of it) and its images (see I)
m)ove-yx[]-to-yz[]-where x and z = a...e,or 0,1,...,9
O: draw circle, (and I images) centered at small cross (see I)
p)lot dot & pause
P)rint -- sets picture to Printer (abort print using Esc )
q: parameters,etc
r)efresh screen
s)cale changed -- opens windows or uses whole screen
t)ic marks
T)icmarks drawn -- extra fine
u)nscale -- undoes last window selection
v: invert process (for Henon or Diferential Equations
w: show coordinates of small cross
x,X,y,Y: set box coordinates at small cross:
(x,y)=lower left coordinates of cross ;(X,Y)=uppper right
*
*Esc
Hitting 'Esc' stops single stepping mode and turns off big cross; see also *p
*
The following line is a * followed by a space ' ' and a return
*
Hitting the space bar ' ' terminates the graphics and returns to the
Main Menu.
*
if (kk == DOWN || kk == UP || kk == RIGHT || kk == LEFT
|| kk == End || kk == PgDn)
*DOWN
The arrow keys move the position of the vector y1[] which is marked by the
small cross; the small cross is turned on if it is off; in single stepping
mode, y[] is plotted. Initially each move of the small cross is 1/100 of the
screen width or height, but the size of these moves can be changed: it is
doubled if you hit the 'End' key and halved by hitting 'PgDn'. Hitting either
of these two will get the step size printed out.
*
if (kk == '+' || kk == '-' ||kk == Home || kk == PgUp )
*+
Keys +/- increase/decrease the value of rho currently being used. Rho is a
common parameter in the maps and differential equations. Use command RS
from menu to set rho step, that is the ammount it is changed by hitting +. It
can also be changed while plotting using either the 'PgUp' or 'Home' keys.
The key 'PgUp' doubles the rho step size used by +/- and 'Home' halves it. +/-
reinitialize dot number and Lyapunov exponents and cause new rho step to be
printed out.
*?
Hitting '?' prints a brief description of options allowed while plotting.
*
if (( kk >= '0') && ( kk <= '9'
*0
There is a variable "printer" that can be set = 0,1,...,6 by hitting the
corresponding digit. The ammount of data displayed or printed out is
determined by this variable, the higher the value, the more data. Setting
it >= '3' causes lyap exponents and ordinary differential equation error
data to be printed out as it is computed. Setting '4' causes a point data
to be printed (ON THE PRINTER) on first call of iterate_map() which then
resets printer to 2. Setting = 5 causes position vector to be printed on
printer EVERY TIME a point is ITERATED which can be more frequent than
plotting. Optimal values are 2 and 3 (=default). 3 is often excessive and
prints so much that the program is slowed.
*
*b
Hitting 'b' causes a box to be drawn. The default position of the box is
the entire screen (or quadrant if you have rescaled to a quadrant). The
positions of the sides of the box are set by first moving the small cross to
lie along one of the sides or corners of the box and then hitting x,X,y, or Y.
x for example denotes the left coordinate of where the box will be drawn.
Hitting x sets the right side of the box equal to the x coordinate
of the small cross. See also x,y,X,Y, or s. Box coordinates are printed
if 'printer' > 1; see '*1'. The region inside the box can be rescaled to be
the entire screen or to be a coordinate using 's'.
Hitting 'B' resets the box coordinates to be the edge of the entire
screen (or quadrant).
*c
To clear the entire screen hit 'C'; if you are plotting in a
window (one of the quadrants of the screen), hitting 'c' (lower
case) clears just that quadrant. If your window is the entire
screen, it also clears that.
To clear the entire screen hit 'C'; if you are plotting in a
window (one of the quadrants of the screen), hitting 'c' (lower
case) clears just that quadrant. If your window is the entire
screen, it also clears that.
*d
'd' turns on double width printing when printing text on the printer. Turn
your printer off and on to reset it.
*
*e
'e' and 'E' are for differential equations; they give estimates of how big
the error is in taking a single step. 'e' does this once and 'E' does it
repeatedly, about every 5 Runge-Kutta steps. Hit 'E' again and it stops.
To carry out 'e', the program compares the last
differential equation step with the result of two steps half as big that
start from the same point. We can expect the two small steps to be about
16 times as accurate as the big step. The reported error is simply the
distance between the two results. This is just the single step (local)
error, not the cumulative error which gets arbitrarily large exponentially
fast in a chaotic system. The ratio of that error to the actual size of
the step (Euclidean norm) is also given. Typing
eeeeeeee (or just holding the key down)
will give the error for a series of points. The maximum of these individual
errors is also kept track. You may note a missing point in the trajectory,
since such evaluated points aren't printed. This way you can tell which
step you tested.
E is a toggle so typing it again will stop the
error_check. The worst error is recorded and is printed on the Main Menu
screen.
*
*i
'i' reinitializes the trajectory vector y to be the current position of y1;
the latter's position is shown by the small cross. (It may be necessary to hit
the Esc key to make the small cross appear. The new x and y of the trajectory
coordinates are printed on the screen. The dot number is set to 0 and
Lyapunov exponents are reinitialized if they are being computed. It also sets
the variable "images" to zero; see interrupt 'I'. Moving the trajectory y
(=y0) to y1 can also be accomplished with the move interrupt: 'm01'.
*
*I
'I' causes the variable "images" to be increased by 1 (whereas hitting 'i'
sets it back to 0); hitting any arrow key moves the small cross and if
"images" is positive, the trajectory is initiallized at the position of the
small cross and then the trajectory is automatically iterated "images" times,
and each of the resulting points is plotted. Moving the arrow keys in this
fashion is best done in one-step mode, that is after 'o' has been hit (since
otherwise the trajectory will continue to be iterated). This
procedure can be terminated and the arrow keys returned to their normal mode
by hitting 'i'; "images" can also be changed using the COMMAND:
images.
'I' and 'i' are also useful with the commands CIRCLE and RCIRCLE,
which causes the drawing of a circle and possibly (if images > 0) some images
of the circle.
*k
Hitting 'k' turns on a feature so that a cross is plotted as each dot is
plotted; the cross is erased when it is time to plot a new dot. Hitting 'k'
again turns off this feature.
*K
'K' turns on a cross at the position of y[]. It stays on when y[] moves away;
holding 'K' down (when not in one step mode) causes a cross to be drawn at a
series of iterates of y[] (each position of y[] if your keyboard sends
keystokes to your computer fast enough); there is a slight difference in the
ways of handling screen and crt, so you should hit 'r' (refresh) to see the
crt version.
*
*L
Set ya, yb, yc, and yd at corners of a quadrilateral;
this is done by moving y1, the little cross to the desired
position and using the triple interrupt
m a 1
That sets ya equal to y1; then move y1 to a new position, etc.
Then command the "box" or interrupt 'l' (lower case L) causes the
quadrilateral to be drawn, and if command "images" or interrupt 'I'
has been used to set the number of images to be > 0, the that number
of images will then be drawn. The image will be curvilinear generally
and the curves are computed accurately even when parts of the images
are greatly stretched.
On the other hand if only ya and yb or ya,yb, and yc are
set (and the rest have the -9999. default values), then that line or
pair of lines and the specified number of images will be drawn. The
arc yc to ya will not be drawn.
*m
'm' is for moving a vector to equal another vector; you will be asked first
for the vector to be moved, whose coordinate values will be changed; the
second vector tells where you want to move it. The trajectory vector is #0,
the small cross is #1. Moving y restarts the dot number to 0 and restarts
the Lyapunov exponents.
*O
The letter O suggests a circle and it results in the drawing of a circle
centered at y1 (the small cross). Moving the cross via the arrow keys
immediately shifts the center of the circle. Just that circle is drawn if
the parameter "images" has value 0, but if it is positive, that number of
images of the circle will also be drawn. see 'i' and 'I'.
Command RA is for changing the radius of this circle.
Hitting O results in the following comments if 'printer' > 1:
"Hit 'I' to increase the number of images of the circle, 'i' to set it to 0"
"Type #RA to change radius of circle; use arrow keys to move the center."
"HIT SPACE BAR ONCE ONLY when you now want to terminate circle routine."
*p
The key 'p' pauses puts the computer after plotting one dot. Each
time 'p' is hit, the program computes one more dot for plotting. The large
cross is positioned at the current location of the trajectory, and as usual
the small cross is at y1[]. Holding 'p' down will produce a string of 'p'
commands. 'Esc' returns the program to normal plotting of dots.
*P
Hitting interrupt 'P' results in a high resolution copy (a copy
that is called the "core copy") of the screen printing a high
resolution picture onto the printer, if you have an Epson
compatible printer or an emulator program. Printing can be
terminated by hitting Esc. See also main menu command PH.
*q
To print out map parameters and coordinates of small cross, hit 'q'. if
'printer' = 0, only the dot number is given. On some computers it will also
report the number of dots per second. This timer is initialized whenever dot
is set to 0. The amount printed depends on the variable "printer"; see also
'*1'.
*r
The program keeps a copy of the picture in core that is higher resolution
than the copy on the screen. That copy is cleaner in that no text is
written on it. 'r' refreshes the screen, eliminating extraneous text by
copying from the core memory copy. The refreshed screen copy of course only
has the resolution of the screen. The core memory copy is the copy of the
picture that is used for printing high resolution copies on a printer.
*
if (kk == 's'
|| kk == F1 || kk == F2 || kk == F3 || kk == F4 || kk == F10)
*s
's' is for rescaling the screen. First move the small cross and use 'x',
'y','X' and/or 'Y' to choose new coordinates for a box. (see 'x'). Hitting x
for example chooses the lower x coordinate of the box to be the x coordinate
of the small cross, while Y is for the upper y box coordinate. Then hit 's'.
Finally, hitting 'F10' rescales the entire screen to the scale of the box.
Hitting 'F1','F2','F3', or 'F4' will instead rescale it to occupy one
quadrant of the screen using the coordinates of the box: upper left, upper
right,etc. The small cross is positioned at the center of the sector.
You can go back and forth between the sections by hitting the appropriate F
key. See also 'u'.
*
if ( kk == F5 || kk == F6 || kk == F7 || kk == F8 || kk == F9)
*F
The colors on the screen are numbered, 0 to 15 for typical EGA boards
with color monitors. The program has an active color that is used in all
plotting (and in refreshing the screen. F8 increases that number while F7
decreases it. F5 is equivalent to interrupt i followed by F7, while F6 is
equivalent to i plus F8. You can specify the desired color number by hitting
F9 followed by an integer and <Enter>.
*t
Interrupts 't' and 'T' give you two sets of tic marks. 't'
also draws the box as 'b' would. Interrupt 'T' and Command "TIC2"
both draw an extra fine set of small tic marks
around where the box is or would be if a box was drawn using
command "DB" or interrupt 'b'. It does not draw the box. "TIC"
should be used if you use "TIC2" so that it is easier to figure out
which values are represented by which tic marks.
*
*T
Interrupts 't' and 'T' give you two sets of tic marks. 't'
also draws the box as 'b' would. Interrupt 'T' and Command "TIC2"
both draw an extra fine set of small tic marks
around where the box is or would be if a box was drawn using
command "DB" or interrupt 'b'. It does not draw the box. "TIC"
should be used if you use "TIC2" so that it is easier to figure out
which values are represented by which tic marks.
*
*u
If you have rescaled, you can use 'u' to unscale. Hitting 'u' again will
give you back the rescaled piture, so 'u' is a toggle.
*
*v
Command "v" and interrupt 'v' invert the Henon map and
invert differential equations; the latter is much simpler than the
former; to invert a differential equation, the sign of the time
step is made negative. The inverse of the Henon map is equivalent to
a Henon map with different parameters and scale so v changes the
parameters and scale. After v, you are dealing with the inverse
of the system until you invert that, returning you to the original.
These are typically dissipative systems, so the trajectories of
the inverse will blow up rapidly.
*
*w
'w' causes the position of the small cross to be printed on the lower right of
the screen; the values are updated when the small cross is moved; hit it
again and this feature is turned off.
':' colon
':' allows you to enter ONE main menu command; To enter another,
hit ':' again; for example, if you are plotting a trajectory and
you want to change a parameter, say rho, hit ':'<Enter>RHO<Enter>
and the new value and <Enter>; the program then returns to
plotting the trajectory with the new rho. To enter a new command,
you would have to hit ':' again or return to the menu. You could
also use ':' to invoke one of the complicated tasks like calling
for Newton's Method, though that routine changes the point y[] of
the trajectory, so there are side effects. Other possible
combinations of complicated commands may confuse the program.
Calling several successive commands requires the program to keep a
great deal in memory simultaneously and the program will
eventually fail. This interrupt is also useful for calling menus.
*
if (kk == 'x' || kk == 'X' || kk == 'y' || kk == 'Y')
*x
'x' sets left coordinate of the box to the current horizontal coordinate of
the small cross, that is, of y1[]. Similarly 'X' sets the right coordinate,
'y' sets the bottom coordinate, and 'Y' the top, all using the small cross.
See 'b' and 's'.
*Q
FOR VGA BOARDS AND COLOR SCREENS ONLY.
Help with COMMAND Q or interrupt Q, enter *Q from the menu.
UNIVERSAL COLOR VALUES
number RED GRN BLUE
0 BLACK 0 0 0
1 BLUE 0 0 2/3 where 2/3 means 42
2 GREEN 0 2/3 0
3 CYAN 0 2/3 2/3
4 RED 2/3 0 0
5 MAGENTA 2/3 0 2/3
6 BROWN 2/3 1/3 0 where 1/3 means 21
7 WHITE 2/3 2/3 2/3
8 GRAY 1/3 1/3 1/3
9 LIGHTBLUE 1/3 1/3 max where max means 63
10 LIGHTGREEN 1/3 max 1/3
11 LIGHTCYAN 1/3 max max
12 LIGHTRED max 1/3 1/3
13 LIGHTMAGENTA max 1/3 max
14 LIGHTYELLOW max max 1/3
15 BRIGHTWHITE max max max
*